import request from '@/utils/request'

// 查询挂号管理列表
export function listRegistration(query) {
  return request({
    url: '/skx/management/getList',
    method: 'get',
    params: query
  })
}

// 查询挂号管理详细
export function getRegistration(registrationId) {
  return request({
    url: '/skx/management/' + registrationId,
    method: 'get'
  })
}

// 新增挂号管理
export function addRegistration(data) {
  return request({
    url: '/skx/management',
    method: 'post',
    data: data
  })
}

// 修改挂号管理
export function updateRegistration(data) {
  return request({
    url: '/skx/management',
    method: 'put',
    data: data
  })
}

// 删除挂号管理
export function delRegistration(registrationId) {
  return request({
    url: '/skx/management/' + registrationId,
    method: 'delete'
  })
}

//
export function getlistbyIndex(query) {
  return request({
    url: '/skx/management/getListbyindex',
    method: 'get',
    params: query
  })
}

//获取诊断信息
export function getinfo(patientId) {
  return request({
    url:`/skx/record/infolist?patientId=${patientId}` ,
    method: 'get'
  })
}
